function Vnorm = normalizeMatrix(V)
%NORMALIZEMATRIX normalize matrix V

Vnorm = zeros(size(V));
for i = 1:size(V,2)
    normSum = sum(V(:,i));
    if normSum ~= 0
        Vnorm(:,i) = V(:,i)*(1/normSum);
    else
        Vnorm(:,i) = V(:,i);
    end
end

end

